<?php
		$iID=$_POST['iID'];
		$iheadportriat=$_POST['iheadportriat'];
		$iname=$_POST['iname'];
		$iprice=$_POST['iprice'];
		$ishopid=$_POST['ishopid'];
		$servername = "127.0.0.1";
		$username = "root";
		$password = "";
		$dbname = "OnlineDeliverOrderSystem_schema";
		// 创建连接
		$conn = new mysqli($servername, $username, $password, $dbname);
		// 检测连接
		if ($conn->connect_error) {
		    die("连接失败: " . $conn->connect_error);
		}
		
		$insertSql = sprintf("INSERT INTO dish (ID, headportriat, name, price, shopID) VALUES ('%s', %d, '%s', %f, '%s')", $iID, $iheadportriat, $iname, $iprice, $ishopid);
			
		if ($conn->query($insertSql) === TRUE) {
		    echo 0;//注册成功
		} else {
		    echo 1;//注册失败
		}
		$conn->close();
?>